//
//  ALResultData.m
//  阿里星球-音乐界面
//
//  Created by Mars_ZXB on 16/8/13.
//  Copyright © 2016年 BAT3. All rights reserved.
//

#import "ALResultData.h"
#import "ALContentData.h"

@implementation ALResultData

- (void)setValue:(id)value forKey:(NSString *)key
{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"data"]) {
        NSMutableArray *dataArray = [NSMutableArray array];
        for (NSDictionary *dataDic in value) {
            ALContentData *dataModel = [ALContentData modelWithDictionary:dataDic];
            [dataArray addObject:dataModel];
        }
        _data = dataArray;
    }
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"]) {
        _idFiled = [(NSNumber *)value integerValue];
    }
}

@end
